package com.example.analysis.controller;

import com.example.analysis.service.StudentService;
import com.example.analysis.utils.Response;
import com.example.analysis.vo.StudentCourseVo;
import com.example.analysis.vo.AbilityDimensionVo;
import com.example.analysis.vo.SemesterWarningVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/student")
@CrossOrigin
public class StudentController {
    @Autowired
    private StudentService studentService;

    @GetMapping("/course_table/{studentId}")
    public Response<StudentCourseVo> getCourseTable(@PathVariable String studentId) {
        return studentService.getCourseTable(studentId);
    }

    @GetMapping("/ability_dimension/{studentId}")
    public Response<AbilityDimensionVo> getAbilityDimension(@PathVariable String studentId) {
        return studentService.getAbilityDimension(studentId);
    }

    @GetMapping("/semester_warning/{studentId}")
    public Response<SemesterWarningVo> getSemesterWarning(@PathVariable String studentId) {
        return studentService.getSemesterWarning(studentId);
    }
}
